function y = nsqueeze (x, d, j)

   ## usage:  y = nsqueeze (x, d, j)
   ##
   ## pick j-th value of dimension d from x

   N = size(x) ;
   N = [N(1:d-1) N(d+1:end)] ;

   I = {":"}(ones(1, ndims(x))) ;

   I{d} = j ;
   y = squeeze(x(I{:})) ;
   y = reshape(y, N) ;

endfunction
